unit uMusicMenu;

interface

uses 
// Own units
  Audio, UCommon;

type
  TMusicMenu = class(THODObject)
  private
    FAudio: TAudio;
  public
    constructor Create;
    destructor Destroy; override;
    procedure Play;
    procedure Stop;
    procedure SetVolume(Value: Byte);
  end;

var
  MusicMenu: TMusicMenu;

implementation

uses uUtils;

{ TMusicMenu }

constructor TMusicMenu.Create;
begin
  FAudio := TAudio.Create;
  FAudio.Add(Path + 'Data\Music\Camptrck.wav', True);
end;

destructor TMusicMenu.Destroy;
begin
  FAudio.Free;
  inherited;
end;

procedure TMusicMenu.Play;
begin
  FAudio.Play;
end;

procedure TMusicMenu.SetVolume(Value: Byte);
begin
  FAudio.Volume := Value;
end;

procedure TMusicMenu.Stop;
begin
  FAudio.Stop;
end;

initialization
  MusicMenu := TMusicMenu.Create;

finalization
  MusicMenu.Free;

end.
